<template>
	<view @click="isDrawer = true">
		<slot>
			<el-button type="primary" link>功能配置</el-button>
		</slot>
	</view>
	<el-drawer :append-to-body="true" v-model="isDrawer" title="功能配置" :size="drawerSize">
		<component :is="component" v-model:param="componentParam" />
	</el-drawer>
</template>

<script>
	export default {
		props: ["component", "componentParam"],
		data() {
			return {
				isDrawer: false,
				drawerSize: "30%"
			}
		},
		mounted() {
			this.drawerSize = this.component.__option.width || this.drawerSize;
		}
	}
</script>

<style>
</style>